<%@ page import="model1.User" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Model1示例</title>
</head>
<body>
    <%
        String username = request.getParameter("username");
        String password = request.getParameter("password");
        User loginUser = new User();
        loginUser.setUsername(username);
        loginUser.setPassword(password);
        if (loginUser.check()) {
            out.print(loginUser.getName() + "您好！");
        } else {
            out.print("登录失败，该用户不存在！");
        }
    %>
</body>
</html>
